package com.ellwood.IPGuard.business.system.convert;

import com.ellwood.IPGuard.infrastruction.domain.entity.system.UmsSysUserEntity;
import com.ellwood.IPGuard.infrastruction.domain.vo.system.user.UmsSysUserExcelVO;
import com.ellwood.IPGuard.infrastruction.domain.vo.system.user.UmsSysUserVO;
import org.mapstruct.BeanMapping;
import org.mapstruct.Mapper;
import org.mapstruct.ReportingPolicy;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @ProjectName: IPGuard-boot
 * @PackageName: com.ellwood.IPGuard.business.system.convert
 * @ClassName: UserConvert
 * @Description: // 用户实体-vo-dto-bo转换
 * @Author: Ellwood
 * @CreateDate: 2024/9/29 - 上午10:55
 * @Version: V1.0.0
 */
@Mapper
public interface UserConvert {
        
        UserConvert INSTANCE = Mappers.getMapper(UserConvert.class);
        
        // vo转entity
        UmsSysUserEntity convertVoTOEntity(UmsSysUserVO userVO);
        
        // entity转vo
        UmsSysUserVO convertEntityTOVo(UmsSysUserEntity userEntity);
        
        //list<entity>转list<pageVo>
        List<UmsSysUserVO> convertListEntityTOVo(List<UmsSysUserEntity> userEntityList);
        
        // List<Excelvo>转list<entity>
        List<UmsSysUserEntity> convertListEVoTOEntity(List<UmsSysUserExcelVO> userExcelVOS);
        
        //list<entity>转list<excelVo>
        List<UmsSysUserExcelVO> convertListEntityTOEVo(List<UmsSysUserEntity> userEntities);
        
        //========================================================================
        
        //list<entity>转list<vo>
        //   List<UmsSysUserQueryVO> convertListEntityTOVo(List<UmsSysUserEntity> userEntityList);
        
        /*@Mapping(target = "page", ignore = true)
        @Mapping(target = "limit", ignore = true)
        @Mapping(target = "order", ignore = true)
        @Mapping(target = "asc", ignore = true)
        @BeanMapping(unmappedTargetPolicy = ReportingPolicy.IGNORE)
        List<UmsSysUserPageQueryVO> convertPageEntityTOVo(List<UmsSysUserEntity> userEntityList);*/
        

}
